<include file="./Application/Admin/View/index/nav.html" />
<script type="text/javascript">
  function firm(){
    if (confirm('你真的要删除吗？')) {
      return true;
    } else {
      return false;
    }
  }
</script>
        <div id="page-wrapper">
        <div class="col-md-12 graphs">
	   <div class="xs" style="min-height: 460px;">
  	 <h3>图书管理</h3>
   <div class="panel-body1">
<script type="text/javascript">
  function checkUser(){
    document.getElementById("formid").submit();
  }
</script>
  <form action="{:U('admin/book/listBook')}" method="post" id="formid">
        <div class="input-group">
            <input type="text" name="b_name" class="form-control1 input-search" placeholder="请输入图书名称">
            <span class="input-group-btn">
                <button class="btn btn-success" style="height: 40px;" type="button" onclick="checkUser();"><i class="fa fa-search"></i></button>
            </span>
        </div><!-- Input Group -->
  </form>
   <table class="table nth-child table-striped table-hover">
     <thead>
        <tr>
          <th>#</th>
          <th>书名</th>
          <th>作者</th>
          <th>类型</th>
          <th>添加时间</th>
          <th width="10%">操作</th>
        </tr>
      </thead>
      <tbody>
        <foreach name="listbook" item="b">
        <tr>
          <th scope="row">{$b.id}</th>
          <td>{$b.b_name}</td>
          <td>{$b.b_zuozhe}</td>
          <td>{$b.b_cate}</td>
          <td>{$b.addtime|date='Y-m-d H:i:s',###}</td>
          <td><a href="{:U('admin/book/delbook',array('id'=>$b['id']))}" onclick="return firm();">删除</a></td>
        </tr>
        </foreach>
      </tbody>
    </table>
    </div>
  </div>
<include file="./Application/Admin/View/index/footer.html" />